package com.xuhao.examai.scoring.application.dto;

import lombok.Data;
import java.util.List;
import java.util.Map;

@Data
public class ExamStatistics {

	private Long examId;
	private String examTitle;
	private Integer totalStudents;
	private Integer submittedCount;
	private Integer scoredCount;
	private Double averageScore;
	private Double maxScore;
	private Double minScore;
	private Double passRate;
	private Double excellentRate; // 优秀率 (90分以上)
	private Double goodRate; // 良好率 (80-89分)
	private Double passRateThreshold; // 及格率 (60-79分)
	private Double failRate; // 不及格率 (60分以下)

	// 分数段分布
	private Map<String, Integer> scoreDistribution;

	// 知识点掌握情况
	private List<KnowledgePointStatistics> knowledgePointStats;

	// 题目难度分析
	private List<QuestionDifficultyStats> questionDifficultyStats;

	@Data
	public static class KnowledgePointStatistics {
		private String knowledgePoint;
		private Integer totalQuestions;
		private Integer correctCount;
		private Double correctRate;
		private Double averageScore;
	}

	@Data
	public static class QuestionDifficultyStats {
		private Long questionId;
		private String questionContent;
		private Integer totalAnswers;
		private Integer correctCount;
		private Double correctRate;
		private Double averageScore;
		private String difficulty;
	}
}